<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="document">
<html>
  	<head>
    	<title>ActionsDS</title>
		
		<link rel="icon" href="/favicon.ico" type="image/x-icon" />
		<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />

		<link href="/css/00-reset.css" rel="stylesheet" type="text/css" media="screen"/>
		<link href="/css/01-jquery.autocomplete.css" rel="stylesheet" type="text/css" media="screen"/>
		<link href="/css/02-calendar-blue.css" rel="stylesheet" type="text/css" media="screen"/>
		<link href="/css/03-formcheck.css" rel="stylesheet" type="text/css" media="screen"/>
		
		<link href="/css/10-actions.css" rel="stylesheet" type="text/css" media="screen"/>

		<script src="/js/00-jquery.js" type="text/javascript"></script>
		<script src="/js/01-jquery.curvycorners.js" type="text/javascript"></script>
		<script src="/js/02-jquery.autocomplete.js" type="text/javascript"></script>
		<script src="/js/03-jquery.cookie.js" type="text/javascript"></script>
		<script src="/js/04-jquery.dynDateTime.js" type="text/javascript"></script>
		<script src="/js/05-formcheck.js" type="text/javascript"></script>

		<script src="/js/10-actions.js" type="text/javascript"></script>

  	</head>
  	
  	<xsl:apply-templates select="relocate"/>
  	
	<body bgcolor="#ffffff">
	<xsl:choose>
		<xsl:when test="string-length(userinfo/login) > 0">
			<div id="smain">
				<div id="head" class="clearfix">
					<div class="logo"><a href="/"><img src="/i/logo.gif" alt="ActionsDS" title="ActionsDS"/></a></div>			
					<xsl:apply-templates select="userinfo"/>
				</div>
				<br class='clear'/>
				
				<div class='insection'>
					<div class="info">
						<xsl:apply-templates select="startpage|security|metabase"/>
					</div>
				</div>
				
				<div id="bottoms">
					&#0169; <a href="http://devimpress.com/" target="_blank">DevImpress</a> 2006-2009 <br/>
					Иконки <a href='http://www.famfamfam.com/lab/icons/silk/' target='_blank' class='text'>Mark James</a><br/>
					<div id="null" style="display: none;"></div>
				</div>
			</div>		
		</xsl:when>
		<xsl:otherwise>
		<div id="centerpanel">
			<form action="/index.aspx" method="POST" vmethod="online">
				<div id="loginbox">
					<label for="i_login">Логин</label><br />
					<input id="i_login" type="text" name="_login" class="lb_field" size="8" maxlength="64" vmethod="pattern" vparam="^[a-zA-Z0-9\.]*$" vnotice="Логин не может быть таким"/><br />
					<label for="i_secret">Пароль</label><br />
					<input id="i_secret" type="password" name="_secret" class="lb_field" size="8" maxlength="64" vmethod="pattern" vparam="string"/><br/>
					<input type="submit" id="lb_go" value=""/>
				</div>
			</form>					
		</div>
		</xsl:otherwise>
	</xsl:choose>	
	</body>	
</html>
</xsl:template>

<xsl:template match="errordocument">
<html>
  	<head>
    	<title>ActionsDS - Error</title>
		
		<link rel="icon" href="/favicon.ico" type="image/x-icon" />
		<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />

		<link href="/css/00-reset.css" rel="stylesheet" type="text/css" media="screen"/>
		<link href="/css/10-actions.css" rel="stylesheet" type="text/css" media="screen"/>

		<script src="/js/00-jquery.js" type="text/javascript"></script>
		<script src="/js/10-actions.js" type="text/javascript"></script>

  	</head>
  <body bgcolor="#ffffff">
		<div id="centerpanel">
			<div id="errorpanel">
				<xsl:choose>
					<xsl:when test="error/@code = '403'">
						Доступ к запрошенному функционалу невозможен. Пожалуйста, свяжитесь с администратором системы.
					</xsl:when>
					<xsl:when test="error/@code = '404'">
						Запрошенная функция не обнаружена. Пожалуйста, свяжитесь с администратором системы.
					</xsl:when>
				</xsl:choose>
			</div>				
		</div>
	</body>	
</html>
</xsl:template>

</xsl:stylesheet>
